package com.alibaba.dubbo.demo.proxy;

import com.alibaba.dubbo.common.bytecode.Proxy;
import com.alibaba.dubbo.demo.inter.SimpleInter;
import com.alibaba.dubbo.rpc.proxy.javassist.JavassistProxyFactory;

/**
 * @author LinQiang on 2017/3/7.
 * @reviewer
 */
public class CustomProxcyFactory {
    private JavassistProxyFactory proxyFactory;

    public void useJavassistProxyFactory() {
        if (null == proxyFactory) {
            proxyFactory = new JavassistProxyFactory();
        }
        //获取SimpleInter的类接口代理
        Proxy classProxy = Proxy.getProxy(SimpleInter.class);

    }

    public static void main(String[] args) {
        CustomProxcyFactory factory = new CustomProxcyFactory();
        factory.useJavassistProxyFactory();
    }
}
